<%@ page pageEncoding="UTF-8"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<style type="text/css">
<!--
.w_300 {
	width: 300px !important
}
-->
</style>
<form:form commandName="model" cssClass="validate"
	id="ciRelationTypeForm" action="configuration/ciRelationType/save">
	<form:hidden path="id" />
	<form:hidden path="name" />
	<div class="header">
		<h2>
			&nbsp;&nbsp;基本信息<span><font color="red">（* 为必填项）</font> </span>
		</h2>
	</div>
	<table class="form-table">
		<tbody>

			<tr>
				<td class="td1">主关联资产类型A：</td>
				<td class="td2"><form:hidden path="fromCategoryId" /> <isperp:treeSelector
						id="fromCategoryName" name="fromCategoryName"
						autocompleteUrl="configuration/category/listTree"
						displayValueCssClass="w_300 required"
						url="configuration/category/getTree"
						valueControlId="fromCategoryId" onlySelectLeaf="false"
						displayValue="${model.fromCategoryName}"></isperp:treeSelector>
				</td>
				<td class="td1">A别名：</td>
				<td class="td2"><form:input path="fromCategoryAliasName" /></td>
			</tr>
			<tr>
				<td class="td1">被关联资产类型B：</td>
				<td class="td2"><form:hidden path="toCategoryId" /> <isperp:treeSelector
						id="toCategoryName" name="toCategoryName"
						autocompleteUrl="configuration/category/listTree"
						displayValueCssClass="w_300 required" onlySelectLeaf="false"
						url="configuration/category/getTree" valueControlId="toCategoryId"
						displayValue="${model.toCategoryName}"></isperp:treeSelector>
				</td>
				<td class="td1">B别名：</td>
				<td class="td2"><form:input path="toCategoryAliasName" /></td>
			</tr>
		</tbody>
	</table>

</form:form>
<div class="header">
	<h2>&nbsp;&nbsp;关系附加属性</h2>
</div>

<isperp:grid
	url="configuration/ciRelationTypeProperty/listDetail?relationTypeId=${model.id }"
	gridId="ciRelationTypePropetyGrid" cusDialogSize="small"
	showSearchbar="false" pager="false" showPager="false" height="auto"
	sortname="order_num" sortorder="asc"
	ondbClickRowEvent="ciRelationTypePropetyGrid.edit(rowid)"
	cusDeleteUrl="configuration/ciRelationTypeProperty/delete"
	cusEditUrl="configuration/ciRelationTypeProperty/edit?relationTypeId=${model.id }">
	<jsp:attribute name="toolbar">
	<isperp:toolbar id="ciRelationUsePropetyToolbar">
		<isperp:button id="ciRelationUsePropetyCreate" icon="icon-plus"
				text="新增关系附加属性" cssClass="nui-mainbtn"
				onclick="ciRelationTypePropetyGridCreate();"></isperp:button>
		</isperp:toolbar>
	</jsp:attribute>
	<jsp:body>
		<isperp:column name="id" title="id" hidden="true"></isperp:column>
		 
		<isperp:column name="name" title="属性" width="100" hidden="false">
		</isperp:column>
		
	</jsp:body>
</isperp:grid>



<isperp:operate code="CI_PROPERTY_MAP"></isperp:operate>
<script type="text/javascript">
	function ciRelationTypePropetyGridCreate() {
		return isperp.submitForm({
			forceSync : true,
			success : function() {
				ciRelationTypePropetyGrid.create();
			}
		});

	}
</script>

<isperp:buttonList>
	<button class="submit nui-mainbtn" onclick="isperp.submitForm();">保存</button>
</isperp:buttonList>


